#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include<assert.h>
void* my_memcpy(void* dest,const void* src, size_t num)
{
	int a = 0;
	void* ret = dest;
	assert(dest && src);
	/*for (a = 0; a < num; a++)
	{
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}*/
	while(num--)
	{
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}
	return ret;
}
int main()
{
	int arr1[] = { 1,2,3,4,5,6,7 };
	int arr2[20]={ 0 };
	int sz = sizeof(arr1) / sizeof(arr1[0]);
	my_memcpy(arr2, arr1+2, 5 * sizeof(int));
 	return 0;
}